package com.ns.scs.msg.entry;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;

/**
 * 消息用户表
 *
 * @author lw
 * @since 2024-11-15
 */
@Data
@ToString
@Accessors(chain = true)
@TableName(value = "SCSS_MSG_USER")
public class MsgUser implements Serializable {
    /**
     * 此模块对应的表名
     */
    public static final String TABLE_NAME = "SCSS_MSG_USER";

    @Serial
    private static final Long serialVersionUID = 1L;

    /**
     * id，--主键、自增
     */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 消息id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long msgId;

    /**
     * 消息状态 0未读 1已读
     */
    private int status;
}
